<header class="d-flex justify-content-between align-items-center g-header">
    <!-- <a href="/" class="g-logo">
        <img src="/img/logo.png" width="24" alt="">
    </a> -->
    <nav class="g-nav">
        <a href="/">发现</a>
        <a href="/topic">话题</a>
        <a href="/user">用户</a>
    </nav>
    <div>
    <?php if(session('user_id')): ?>
        <a href="/a"><?= session('user_name') ?></a>
        <a href="/post/new">发帖</a>
        <a href="/user">空间</a>
        <a href="/login/logout">退出</a>
    <?php else: ?>
        <a href="/login">
            <i class="iconfont icon-user fs-20"></i>
        </a>
    <?php endif; ?>
    </div>
</header>

